home *** CD-ROM | disk | FTP | other *** search
/ Disc to the Future 2 / Disc to the Future Part II Programmer's Reference (Wayzata Technology)(6013)(1992).bin / MAC / THINKC / 5 / BOOZ_MAC / BOOZ_2 / ZOO.H < prev   
Text File  |  1992-07-19  |  2KB  |  74 lines

  1. /* zoo.h */
  2.  
  3. /* 
  4. The contents of this file are hereby released to the public domain.
  5.                                    -- Rahul Dhesi 1987/02/08
  6. */
  7.  
  8. #define SIZ_TEXT  20
  9. #define FNAMESIZE 13
  10. #define MAX_PACK 1
  11. #define LO_TAG (0xa7dc)
  12. #define HI_TAG (0xfdc4)
  13.  
  14. struct zoo_header {
  15.    char text[SIZ_TEXT];
  16.    unsigned lo_tag;
  17.    unsigned hi_tag;
  18.    long zoo_start;
  19.    long zoo_minus;
  20.    char major_ver;
  21.    char minor_ver;
  22. };
  23.  
  24. struct direntry {
  25.    unsigned lo_tag;
  26.    unsigned hi_tag;
  27.    char type;
  28.    char packing_method;       /* 0 = no packing, 1 = normal LZW */
  29.    long next;                 /* pos'n of next directory entry */
  30.    long offset;               /* position of this file */
  31.    unsigned int date;         /* DOS format date */
  32.    unsigned int time;         /* DOS format time */
  33.    unsigned int file_crc;     /* CRC of this file */
  34.    long org_size;
  35.    long size_now;
  36.    char major_ver;
  37.    char minor_ver;            /* minimum version needed to extract */
  38.    char deleted;              /* will be 1 if deleted, 0 if not */
  39.    long comment;              /* points to comment;  zero if none */
  40.    unsigned int cmt_size; /* length of comment, 0 if none */
  41.    char fname[FNAMESIZE]; /* filename */
  42. };
  43.  
  44. /* offsets of items within the canonical zoo archive header */
  45. #define  SIZ_ZOOH 34
  46. #define  TEXT_I   0
  47. #define  ZTAG_I   20
  48. #define  ZST_I    24
  49. #define  ZSTM_I   28
  50. #define  MAJV_I   32
  51. #define  MINV_I   33
  52.  
  53. /* offsets of items within the canonical directory entry structure */
  54. #define  SIZ_DIR  51
  55. #define  DTAG_I   0
  56. #define  DTYP_I   4
  57. #define  PKM_I    5
  58. #define  NXT_I    6
  59. #define  OFS_I    10 
  60. #define  DAT_I    14 
  61. #define  TIM_I    16 
  62. #define  CRC_I    18 
  63. #define  ORGS_I   20 
  64. #define  SIZNOW_I 24 
  65. #define  DMAJ_I   28 
  66. #define  DMIN_I   29 
  67. #define  DEL_I    30 
  68. #define  SPARE_I  31 
  69. #define  CMT_I    32 
  70. #define  CMTSIZ_I 36 
  71. #define  FNAME_I  38 
  72.  
  73. #define  FNM_SIZ  13
  74.